package com.mifengs.mall.adapter;

import android.support.annotation.LayoutRes;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.mifengs.mall.R;
import com.mifengs.mall.entity.AdvertBean;
import com.mifengs.mall.entity.MenuBean;
import com.mifengs.mall.entity.UpdateData;
import com.mifengs.mall.util.ImageLoadUtil;

/**
 * Created by lihaoqi on 2017/11/1.
 */

public class ClassifyRvAdapter extends BaseQuickAdapter<AdvertBean,BaseViewHolder> {


    public ClassifyRvAdapter() {
        super(R.layout.item_classify);
    }

    @Override
    protected void convert(BaseViewHolder helper, AdvertBean item) {
        helper.setText(R.id.tv_name,item.getText());
        ImageView ivImg =  helper.getView(R.id.iv_img);
        ImageLoadUtil.displayImage(mContext,item.getImg(),ivImg);
    }
}
